from pdftools.pdffile import PDFDocument

file = 'PORR-AMICI-2911702-1.pdf'
doc = PDFDocument(file)

print "Document uses PDF format version", doc.document_version()
    
pages = doc.count_pages()
print "Document contains %i pages." % pages
    
if pages > 123:
    
	page123 = doc.read_page(123)
	contents123 = page123.read_contents()
	
	print "The objects found in this page:"
	print
	print contents123.contents

total_number = doc.count_pages()
page_object  = doc.read_page(1) # 1 <= number <= total_number
page = doc.read_page(1)
co = PDFContents(page)
print co
